package com.irdstudio.apicenter.gateway.web.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;

import com.irdstudio.apicenter.gateway.comm.MaccsPacket;
import com.irdstudio.apicenter.gateway.web.MaccsTradeDefineVo;
import com.irdstudio.apicenter.gateway.web.view.View;
/**
 * 
 *Liana后端业务调用Controller
 * @author Administrator
 *
 */

@Controller
public class ShowImage implements IController {
	
	private static final Logger log = LoggerFactory
			.getLogger(ShowImage.class);

	 
	public View execute(MaccsTradeDefineVo tradeDefine,MaccsPacket inPacket,HttpServletRequest request, HttpServletResponse response) {
		return null;
//		this.request = request;
//		StringBuffer sb=new StringBuffer();
//		sb.append("Cookie:").append(request.getHeader("Cookie") );
//		log.debug("header:"+sb.toString());
//		this.response = response;
//		Object reultData;
//		 
//		Map<String, String> values= getRequestValues();
//		String did=values.get("d");
//		String encode_msg=values.get("e");
//		String channel=values.get("channel");
//		if(channel==null){
//			channel=values.get("channel");
//		}
//	/*	int check_result=AuthManager.basicCheck(did, encode_msg,values.get("action"),request);
//		if(channel==null||(MaccsConstant.NoCheck_channel.indexOf(channel)==-1&&check_result!=0)){
//			log.warn("Client Check Fail:"+check_result);
//			reultData=getError("1005","无效请求");
//			return new JsonView(request, response, reultData);
//		}*/
////		String msg=prepareParam(values);
//		//String msg=prepareParamWithSpecialFormat(values);
//		log.debug("req backend param:"+msg);
//		try {
////			List list = (List)ServiceManage.getHttpResource().sendAndWait_ForStream(values.get("action"),msg,sb.toString(),request);
////			reultData=list.get(0);
////			if(list.size()>1){
////				String setCookie=list.get(1).toString();
////				setCookie(setCookie,(Integer)list.get(2));
////			}
//		} catch (Exception e) {
//			log.error("",e);
//			//reultData=getError("1001","通信异常");
//			return new JsonView(request, response, null);
//		}
//		return new ImageView(request, response, "");
	}
}
